const defaultState = {
  number: 0,
}

const reducer = (state = defaultState, action) => {
  if (action.type === 'num') {
    return { ...state, number: action.payload }
  }

  return { ...state }
}

export default reducer
